package cn.iocoder.yudao.module.crossborder.platform.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 跨境电商平台类型枚举
 *
 * @author 芋道源码
 */
@AllArgsConstructor
@Getter
public enum PlatformTypeEnum {

    AMAZON("AMAZON", "Amazon", "亚马逊"),
    EBAY("EBAY", "eBay", "易贝"),
    SHOPIFY("SHOPIFY", "Shopify", "Shopify"),
    WALMART("WALMART", "Walmart", "沃尔玛"),
    ;

    /**
     * 平台类型
     */
    private final String type;
    
    /**
     * 平台名称
     */
    private final String name;
    
    /**
     * 平台中文名称
     */
    private final String chineseName;

    public static PlatformTypeEnum getByType(String type) {
        for (PlatformTypeEnum value : values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }

}
